<?php
/***********************************************************
 主导航栏上的排行榜
*************************************************************/

class HotAction extends Action {
    public function index() {
        $uModel=D('Users');
        $topcity=$_GET['c'];
        if (!$topcity) {
            $condition='';
        } else {
            $condition=" AND live_city LIKE '%$topcity%'";
        }

        $top1=$uModel->where('user_auth=1 AND followme_num>0'.$condition)->order('followme_num DESC')->limit(25)->select();
        $top2=$uModel->where('user_auth=0 AND followme_num>0'.$condition)->order('followme_num DESC')->limit(25)->select();
        $top3=$uModel->where('msg_num>0'.$condition)->order('msg_num DESC')->limit(25)->select();

        $this->assign('topcity',$topcity);
        $this->assign('top1',$top1);
        $this->assign('top2',$top2);
        $this->assign('top3',$top3);
        $this->assign('menu','hot');
        $this->assign('subname','排行榜');
        $this->display();
    }
}
?>